//
//  MSPopupConfigure.h
//  MSPopupsManager
//
//  Created by zz on 22.4.24.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef dispatch_block_t MSPopupCallback;

@interface MSPopupConfigure : NSObject
/// 弹窗唯一标识
@property (nonatomic, copy) NSString *identifier;
/// 优先级 范围0~1000 (默认0,遵循先进先出)
@property (nonatomic, assign) NSInteger priority;
/// 弹窗的容器视图，默认是当前APP的keywindow,可以设置成其他容器
@property (nonatomic, weak) UIView *containerView;
/// 持续时长 设置后会在设定时间结束后自动dismiss,不设置不会自动消失
@property (nonatomic, assign) NSTimeInterval dismissDuration;
/// 只支持倒计时显示，不做关闭处理(默认为NO)
@property (nonatomic, assign, getter=isOnlyCountModel) BOOL onlyCountModel;
/// 弹窗视图后面的背景色，通常是默认的半透明黑色，可自定义设置
@property (nonatomic, strong) UIColor *backgroundColor;
/// 背景透明度
@property (nonatomic, assign) CGFloat backgroundAlpha;
/// 点击弹窗背景（弹窗内容之外的区域）弹窗是否消失 default NO
@property (nonatomic, assign, getter=isClickOutsideDismiss) BOOL clickOutsideDismiss;
/// 弹窗内容圆角方向,默认UIRectCornerAllCorners,当cornerRadius>0时生效
@property (nonatomic, assign) UIRectCorner rectCorners;
/// 该属性默认NO。设置YES会让之前的所有弹窗全部清除掉（优先级属性失效)熔断模式开启
@property (nonatomic, assign, getter=isCircuitBreaker) BOOL circuitBreaker;
/// 弹窗内容圆角大小
@property (nonatomic, assign) CGFloat cornerRadius;

#pragma mark - 弹窗显示生命周期
@property (nullable, nonatomic, copy) MSPopupCallback popViewDidShowCallback;
@property (nullable, nonatomic, copy) MSPopupCallback popViewDidDismissCallback;

- (void)configureDefaultParams;

@end

NS_ASSUME_NONNULL_END
